package com.sdsy.blockchaintrainingback.controller.training;

import com.github.dockerjava.api.model.Container;
import com.sdsy.blockchaintrainingback.pojo.common.CommonResult;
import com.sdsy.blockchaintrainingback.pojo.training.Training;
import com.sdsy.blockchaintrainingback.service.docker.DockerService;
import com.sdsy.blockchaintrainingback.service.training.TrainingService;
import com.sdsy.blockchaintrainingback.vo.training.TrainingRespVo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import static com.sdsy.blockchaintrainingback.pojo.common.CommonResult.success;

/**
 * @Description TODO
 * @Author linzili
 * @Date 2023/9/26 23:07
 * @Version 1.0
 */
@RestController
@RequestMapping("/training")
public class TrainingController {

    @Resource
    private TrainingService trainingService;

    @GetMapping
    public CommonResult<List<TrainingRespVo>> list(@RequestParam(required = false) String name) {
        return success(trainingService.list(name));
    }


}
